<template>
    <div class="report-four">
        <div class="body">
            <div class="list">
                <h4>
                    <span>04</span>各试题得分情况
                </h4>
                <div class="table-head">
                    <span>题目总数：{{tableData.quesCount}}道题 </span>
                    <span>题目总分：{{tableData.score}}分 </span>
                    <span>个人得分：{{tableData.stuScore}}分</span>
                    <span>总平均分{{tableData.avg}}</span>
                </div>
                <el-table stripe :data="tableData.quesList" style="width: 100%" header-align="center" empty-text="暂无学生" class="report-table">
                    <el-table-column prop="sort" label="小题" align="center">
                        <template scope="scope">
                            {{scope.row.name||scope.row.sort}}
                        </template>
                    </el-table-column>
                    <el-table-column prop="quesType" label="题型" align="center"></el-table-column>
                    <el-table-column prop="score" label="分值" align="center"></el-table-column>
                    <el-table-column prop="getScore" label="得分" align="center"></el-table-column>
                    <el-table-column prop="getScore" label="平均得分率" align="center">
                        <template scope="scope">
                            <span>{{scope.row.scoringRate*100 |formatNumber(2) }}%</span>
                        </template>
                    </el-table-column>
                    <el-table-column label="难易度" prop="modelScore" align="center" width="200px">
                        <template scope="scope">
                            <el-rate v-model="scope.row.hard" disabled disabled-void-color="#ccc">
                            </el-rate>
                        </template>
                    </el-table-column>
                    <el-table-column prop="know" label="知识点" align="center"></el-table-column>
                    <el-table-column v-if="showRemark" prop="remark" label="备注" align="center"></el-table-column>
                </el-table>
            </div>
        </div>
    </div>
</template>
<script>

import io from '../../lib/io'
import util from '../../lib/util'

export default {
    components: {

    },


    data() {
        return {
            reportId: "",
            tableData: [],
            star: [1, 2, 3, 4, 5],
            showRemark:false
        }
    },
    watch: {

    },
    created() {
        this.reportId = this.$route.query.reportId
        this.reportQues()

    },
    mounted() {
    },
    methods: {
        reportQues() {
            let param = {
                reportId: this.reportId,
            }
            io.post(io.reportQues, param, (ret) => {
                ret.quesList&&ret.quesList.map((item,i)=>{
                    if(item.remark){
                        this.showRemark=true
                    }
                })
                this.tableData = ret
            })
        }
    }

}
</script>
<style lang="less" scoped>
.report-four {

    .body {
        padding: 46px 0;
        background: rgba(251, 250, 250, 0.9);
        .list {
            width: 80%;
            max-width: 960px;
            margin: 0 auto;
            h4 {
                font-size: 32px;
                color: #ff7853;
                margin: 0;
                height: 32px;
                line-height: 32px;
                font-weight: 100;
                span {
                    height: 32px;
                    line-height: 32px;
                    font-weight: 100; // display: inline-block;
                    float: left;
                    font-size: 40px;
                    color: #488eed;
                    padding-right: 24px;
                    margin-right: 17px;
                    border-right: 2px solid #488eed;
                }
            }
            .table-head {
                margin-top: 40px;
                height: 58px;
                width: 100%;
                font-size: 18px;
                color: #fff;
                line-height: 58px;
                padding-left: 40px;
                box-sizing: border-box;
                background: #488eed;
                border-top-left-radius: 8px;
                border-top-right-radius: 8px;
                span {
                    margin-right: 48px;
                }
            }
            .el-table {
                .img-star {
                    display: inline-block;
                    width: 14px;
                    height: 14px;
                    margin-right: 4px;
                    img {
                        width: 100%;
                        height: 100%;
                    }
                }
            }
        }
    }
}
</style>
<style lang="less">
.report-four {
    .report-table {

        border: solid 1px #a3c6f6;
        border-radius: 0;
        font-size: 16px; // border-top-left-radius:8px;
        // border-top-right-radius:8px;
        &.el-table th,
        .el-table__fixed-header-wrapper thead div,
        .el-table__header-wrapper thead div,
        .el-table__footer-wrapper thead div {
            // background:rgb(231, 236, 255);
            background: #fff;
            color: #333;
            font-size: 18px;
            font-weight: normal;
        }
        &.el-table th {
            border-bottom: 1px solid #9ab9df;
        }
        &.el-table td {
            // border-bottom:1px dashed #9ab9df;
            border-bottom: 0 none;
        }
        .el-table--striped .el-table__body tr.el-table__row--striped td {
            background: #ecf3fd !important;
        }
    }
    .el-table--striped .el-table__body tr.el-table__row--striped td {
        background: #ecf3fd;
    }
    .el-table .el-table__body .delstatu:hover>td {
        background: transparent;
    }
}
</style>



